import { lazy } from 'react';
const Role = lazy(() => import('../components/Compmgr/Role'))
const User = lazy(() => import('../components/Compmgr/User'))
const Vendor = lazy(() => import('../components/Basic/Vendor'))
const Config = lazy(() => import('../components/Facility/Config'))
const Posittype = lazy(() => import('../components/Facility/Posittype'))
const WareHouse = lazy(() => import('../components/WareHouse/WareHouseLayout'))

export const routes = [
    {
        path: "/compmgr",
        name: "系统管理",
        order: 1,
        icon: "GooglePlusOutlined",
        children: [
            {
                path: "/compmgr/role",
                name: "角色",
                order: 1,
                route: <Role />
            },
            {
                path: "/compmgr/user",
                name: "用户",
                order: 2,
                route: <User />
            }
        ]
    },
    {
        path: "/basic", name: "基本资料", order: 2, icon: "AliwangwangOutlined", children: [
            { path: "/basic/owner", name: "货主", order: 1 },
            { path: "/basic/vendor", name: "供应商", order: 2, route: <Vendor /> },
            { path: "/basic/warehouse", name:"仓位", order:3, route:<WareHouse/>}
        ]
    },
    {
        path: "/facility", name: "物流设施", order: 3, icon: "GithubOutlined", children: [
            { path: "/facility/wrh", name: "仓位", order: 1 },
            {path:"/facility/posittype",name:"货位类型",order:2,route: <Posittype/>},
            { path: "/facility/config", name: "配置中心", order: 3, route: <Config /> }
            
        ]
    },
    {
        path: "/c", name: "大数据", order: 4, icon: "AppleOutlined", children: [
            {
                path: "/c/1", name: "数据分析", order: 1, children: [
                    { path: "/c/1/1", name: "商品货位库存动销查询", order: 1 },
                    { path: "/c/1/2", name: "商品周转天数查询", order: 2 }
                ]
            },
            {
                path: "/c/2", name: "基础数据", order: 2, children: [
                    { path: "/c/2/1", name: "拣货位分析查询", order: 1 },
                    { path: "/c/2/2", name: "容器查询", order: 2 }
                ]
            }
        ]
    }
]